{% extends "dialog.html" %}
{% block body %}
	<center>
		<form method="POST" >
		<table>
			<tr><td></td></tr>
		{% if is_dir %}
			<tr>
				<td>
					<label>标题：</label>
				</td>
				<td>
					<input type="text" name="title" id="id_title" value="{{ obj.title }}" />
				</td>
			</tr>
		{% else %}
			<tr>
				<td>
					<label>标题：</label>
				</td>
				<td>
					<input type="text" name="title" id="id_title" value="{{ obj.title }}" /><br/>
				</td>
			</tr>
			<tr>
				<td>
					<label>链接：</label>
				</td>
				<td>
					<input type="text" name="url" id="id_url" value="{{ obj.url }}" />
				</td>
			</tr>
		{% endif %}
			<tr>
				<td>
					<label>文件夹：</label>
				</td>
				<td>
					<select id="id_parent" name="parent">
						<option value="" >------</option>
						{% for dir in dirs %}
						<option value="{{ dir.key }}" {% ifequal parent dir.key %}selected{% endifequal %}>{{ dir.title }}</option>
						{% endfor %}
					</select>
				</td>
			</tr>
			<input type="hidden" name="dir" id="id_dir" value="{{ dir }}" />
			<input type="hidden" name="is_dir" id="id_is_dir" value="{{ is_dir }}" />
			<input type="hidden" name="next" id="id_next" value="{{ next }}" />
			<tr>
				<td colspan="2" style="text-align:right;">
					<input type="submit" value="保存" />
				</td>
			<tr>
		</table>
		</form>
{% endblock %}